#pragma once
#include <SFML/Graphics/Text.hpp>
#include <nice2d/widgets/label.h>

class DraggableLabel : public Label
{
    DECLARE_OBJECT(DraggableLabel)
public:
    DraggableLabel(const sf::Vector2f &size = sf::Vector2f(150.0f,24.0f));
    virtual ~DraggableLabel();
public:
    void setDragable(bool dragable);
    bool isDragable();
    boost::signals2::signal<void(bool)> dragableChanged;

    boost::signals2::signal<void()> clicked;
    void setTargetControl(ControlPointer target);
protected:
    virtual void onMousePressed(sf::Mouse::Button button) override;
    virtual void onMouseMoved(int x,int y)override;
private:
    std::unique_ptr<class DraggableLabelData> data;
};
